
// const myBehavior = require("../../behaviors/my-behavior")
import myBehavior from "../../behaviors/my-behavior"

Component({
  behaviors: [
    myBehavior
  ],
  options: {
    multipleSlots: true,
    // styleIsolation: 'shared'
  },
  properties: {
    heading: {
      type: String,
      value: "Click me"
    }
  },
  data: {
    count: 23,
    msg: "组件data覆盖了behaviors"
  },
  methods: {
    addCount() {
      console.log(this)
      // 返回新的data
      this.setData({
        count: ++this.data.count
      })
      console.log(this.data.count)
    }
  }
});
